home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 6 / MacMania 6.toast / / Tools&Utilities / EnterAct Stuff / Documentation / EnterAct in brief < prev    next >
Text File  |  1997-05-26  |  24KB  |  583 lines

  1. *********EnterAct in brief (this is not the manual) *************
  2. ____
  3. Last revised: May 1997, for v4.0.
  4. ____
  5. -----------
  6. Introduction
  7. -----------
  8.  
  9. EnterAct is a full C/C++/Java project-oriented editor, with
  10. additional code definition display capabilities. And then some.
  11.  
  12. Most of EnterAct's best features work with first-draft,
  13. uncompilabe code. As long as the delimiters balance and
  14. the key words are not too badly misspelled, EnterAct will
  15. provide instant definition and prototype display, a class
  16. browser, jumping to definitions, cross-referencing etc.
  17.  
  18. EnterAct typically needs 4-10 Meg for medium to large projects.
  19. (The default 9 Meg partition is recommended for routine work.)
  20. Sorry, that's the price of power. EnterAct is compatible with
  21. Virtual Memory and Ram Doubler™. And more SIMMs/DIMMs.
  22.  
  23. EnterAct also requires system 7.5, and likes large screens.
  24.  
  25. ---------------
  26. Necessary things
  27. ---------------
  28.  
  29. §    Installation
  30. Please see "Installing EnterAct 4/tt". Not much to do, just make
  31. a few aliases and drop them in your EnterAct Stuff folder.
  32.  
  33. §    Adding Java files
  34. Everything for Java files is the same as for C++ files.
  35. For best results, grab the source for the standard java libraries
  36. somewhere (eg CodeWarrior) and add it to your project.
  37.  
  38. §    Making a new project
  39. Select "New Project" (this same dialog appears when you start up
  40. EnterAct) and cancel the "Open Project"dialog. Give your project a
  41. name, and save it.
  42.  
  43. In the subsequent "Select <system> Folder..." dialog that appears,
  44. select the folder that holds your system <header> files. If you
  45. have placed EnterAct within a folder that also holds these files,
  46. you can just Cancel. If are leaving EnterAct in its own folder
  47. (the simplest approach) then select your main IDE folder as your
  48. <system> folder. You can drop an alias of your main IDE folder
  49. (eg "Metrowerks CodeWarrior alias") into your EnterAct folder,
  50. and then select the alias as your <system> folder. Please see
  51. "Installing EnterAct 4/tt" for details.
  52.  
  53. The easiest way to add files to your project is to drag files or
  54. folders or aliases onto your project window. When you do this,
  55. all files in subfolders will also be added.
  56.  
  57. Or add files with the "Add Files..." or "Add All in Folder..." commands:
  58. hold down the <Shift> key and the latter becomes "Add All in
  59. Subfolders...". With the "Add All" commands, use the button at the
  60. bottom of the dialog to add whole folders at once (including all
  61. files in subfolders if the <Shift> key was down).
  62.  
  63. Adding all toolbox headers is simplest if you make an alias for
  64. your favorite "Universal Headers" folder, and drag the alias onto
  65. your project window.
  66.  
  67. You can also add toolbox headers with the "Add Mac Headers"
  68. command. Note this adds the right headers only if your <system>
  69. folder contains exactly one copy of the toolbox headers. If you see
  70. a complaint about multiple versions of the toolbox headers, you
  71. can add the toolbox headers by dragging the actual header folder
  72. (or preferably an alias to it) onto your project window.
  73.  
  74. Add as many or as few files as you want, regardless of whether
  75. they make up a complete project. Neglect not non-source files
  76. (spec, design etc) which end up in the rightmost project window
  77. pane. Source files are in the left pane, headers in the middle. To
  78. force source files with nonstandard extensions into particular
  79. panes, use "File Extensions...." to enter the selection and pick the pane.
  80.  
  81. Things work best if you include definitions for all the names in
  82. your source code, especially toolbox terms but also PowerPlant or
  83. TCL, ANSI headers, java library source etc. If you make aliases for
  84. these folders and place them in your EnterAct folder, you'll be able
  85. to make new projects easily.
  86.  
  87. NOTE if a folder's name is in parentheses, the files in it will not
  88. be added to your project. To exclude a folder such as "Old Source",
  89. change its name to "(Old Source)".
  90.  
  91. If you add more than one file with the same name, truncated full
  92. path names will appear to the right of the file name, to help you
  93. tell which file is which. (See "Building a project dictionary" just
  94. below to exclude files from being built into your dictionary).
  95.  
  96. The project window responds to many keys in standard ways.
  97. Go left and right across the three panes with the left and right
  98. arrow keys, <Command><down arrow> to go to the bottom of a
  99. pane etc. To type your way to a particular file, you can type
  100. the first part of the name or any distinctive part of the name
  101. (useful if you have a lot of files whose names all begin with the
  102. same prefix, eg to advance to "PROJECT7_Mouse.c" you could
  103. probably type just "mou").
  104.  
  105. You can open a file from your project window by double-clicking
  106. on it, or hitting <Return>, or use "Go to..." with the name selected.
  107. In all cases, the project window itself will go all the way to the back.
  108.  
  109. Please add this file to your project for handy reference (use "Add
  110. Front File"), and add the "EnterAct 4 Manual" as well - eventually,
  111. you'll want to browse through it.
  112.  
  113. §    Building a project dictionary
  114. To exclude a file from being built into your dictionary, hold down
  115. the <Command> key and click on its name in the project window.
  116. A dash '-' will appear to the left of its name, meaning your
  117. dictionary will be "minus" that file.
  118.  
  119. Select "Update Dictionary". If you run into a problem, see
  120. «EnterAct 4 Manual» 133.
  121. (click in the line above and select "Go to..." from the Search menu -
  122. if you've added the manual to your project, this will open the
  123. manual and take you to the line.)
  124.  
  125. Now and then (typically when lookup doesn't give expected
  126. results) issue an "Update Dictionary" to keep your
  127. dictionary current. Your dictionary tracks everything defined
  128. outside of function bodies, so if you add a member to a class
  129. or define a new method, your dictionary will be "out of date".
  130. On a 68040 machine running at 25 Mhz an incremental update
  131. takes about 6 secs, a nice little "mini-break".
  132.  
  133.  
  134. §    Looking up definitions
  135. The AutoLook window is EnterAct's reason for being, so please
  136. try it out!
  137.  
  138. Here are a couple of examples, from PowerPlant code.
  139.  
  140. Double-clicking on "SetPreRecordSelection" (or just clicking after the
  141. name) instantly produces the display shown in the AutoLook window:
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168. Below, a double-click or click after the name "mTextEngine" shows in the
  169. AutoLook window that it's an "LTextEngine", and the complete definition
  170. of LTextEngine is also shown, for those occasions when you actually
  171. want to do something with one:
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198. For any sort of lookup to work, you must have a project with
  199. built dictionary open.
  200.  
  201. Select "AutoLook": when you type or click after or double-click
  202. on a C/C++ or Java name in any window, the AutoLook window
  203. will display its definition. This includes names for structs,
  204. unions, enums, enum constants, functions, methods, classes, file
  205. or global or local scope variables, defines, and data members.
  206. There are some minor exceptions (eg an enum defined within
  207. a function body will have no lookup) but you should find that
  208. AutoLook shows something useful for better than 99% of the
  209. names in your code.
  210.  
  211. In order for the AutoLook window to display definitions for local
  212. variables, the file in question must be a source file (ie its name
  213. must end in .c or cp etc) and if you've just created a function you
  214. should save the file. Clicking after a local variable name will then
  215. produce a definition in the AutoLook window.
  216.  
  217. AutoLook is less accurate in non-source windows, but it still
  218. works.
  219.  
  220. As of v3.5, AutoLook provides fast extremely accurate lookup for
  221. data member and method names, even in complicated "reference
  222. chains" such as "mObject->SomeMethod().aMember[i].whatsIt"
  223. --just click after any name and the AutoLook window will show
  224. you what it is, or make very good guesses in the rare cases when
  225. the method's context doesn't provide enough scope resolution,
  226. or your spelling is wrong.
  227.  
  228. For a more permanent separate display of the definition, press the
  229. <Enter> key. A separate lookup window will appear. Hold down the
  230. <Option> key and drag in the lookup window's title bar to select the
  231. exact definition you want from a popup menu. Note that local
  232. variables are at present excluded, you'll have to Copy and Paste
  233. from the AutoLook window if you want a separate view of them.
  234. (Tip: for local variables, click after the type name for the variable
  235. in the AutoLook window, and press <Enter> to create a more
  236. permanent display of the definition in a separate lookup window.)
  237.  
  238. To look up the struct or class containing a particular member,
  239. again double-click on or click to the right of the name, and press
  240. <Shift><Enter>. A lookup window will appear, holding struct or
  241. class definitions that contain the member. There will often be
  242. several, so use the lookup window's popup menu as described just
  243. above to pick the one you want. The AutoLook window
  244. will usually display the definition you want as soon as you click
  245. to the right of the name, so this isn't much needed unless you
  246. want a separate display of the definition.
  247.  
  248. To use EnterAct as a lookup aid while working mainly with
  249. some other editor: have a relevant EnterAct project open,
  250. dictionary built, AutoLook open and _frontmost_; in the other
  251. editor, Copy the term you want looked up, and switch to
  252. EnterAct. If the definition does not immediately appear in
  253. the AutoLook window, press <Commmand><Enter>. If it was
  254. a member name and you want the full definitions of the containing
  255. structs or classes, press <Shift><Command><Enter>.
  256.  
  257. All lookup windows including AutoLook are fully editable but
  258. cannot be saved.
  259.  
  260. [
  261. First-time user? You've just read 90% of what you need to know
  262. about EnterAct, so if you haven't already please make yourself
  263. a project and start trying AutoLook out.
  264. ]
  265.  
  266. §    Browsing
  267. Select "Browse" from the EnterAct menu. A pretty browser of
  268. the graphic sort appears, showing your C++ or Java classes.
  269. (As mentioned, class browsing works with first-draft code.)
  270.  
  271. Click-and-hold on any class name to view its methods.
  272.  
  273. Click and <Shift>click on and off of class names to show/hide
  274. multiple inheritance lines.
  275.  
  276. To view a particular class, type the first part or some distinctive
  277. part of its name. 
  278.  
  279. You can also use the Find dialog and the Find Again command to
  280. find classes in the browser window (eg if you're looking at the
  281. source for a class and want to see where the class is in the
  282. browser, use Enter Selection to enter the class name in the Find
  283. dialog, then bring the browser to the front and do a Find Again).
  284.  
  285. "User" class names are _underlined_, <system> class names are not.
  286.  
  287. If a class "uses" or "has" member classes, these will be listed
  288. below the main class name, separated from it by a white line.
  289. You can also double-click on these names to jump to their
  290. definitions, or click-and-hold to select one of their method
  291. names from a popup.
  292.  
  293. The multiple inheritance lines often aren't enough, so if you
  294. <Option> click on a class name you'll see a popup
  295. listing all of the classes from which it is derived. If you let
  296. go the mouse while over one of these base class names you'll
  297. jump to its definition.
  298.  
  299. If you <Command> click on a class name the resulting popup
  300. will show not only all methods in the class but all methods it
  301. inherits. Note if it's an ENORMOUS list of methods, it make take
  302. 5 seconds for the popup to show-please be patient the first
  303. few times you try this.
  304.  
  305. In all method popups, virtual methods are marked with a "v" so
  306. you can tell at a glance if a method wants or needs or has an
  307. override.
  308.  
  309. Summary of class popups:
  310.     • click on a class name: all methods defined by the class
  311.     • <Command> click: all inherited methods too
  312.     • <Option> click: the parents of a class.
  313.  
  314.     Finding Definitions
  315. Single words: <option>double-click and off you go. Jumping to a
  316. definition like this works with just about anything in your code.
  317. If you end up in the wrong place, this normally means there is
  318. more than one definition of the term in your code: you'll see how
  319. to handle this one four paragraphs below. If you have developed a
  320. natural reluctance to <option>double-click on names, try to
  321. overcome it: with EnterAct, something actually happens.
  322.  
  323. Full method names (eg "TCircle::Draw") : select the full name
  324. and use "Find Definition". Or, <Option>double-click on one word,
  325. drag to the other, and release.
  326.  
  327. Just the method name (eg "Draw") :  normally the AutoLook
  328. window will show just the one you want, but even if it
  329. shows several you can jump to it by <Option>double-clicking
  330. on the full method name in the AutoLook window.
  331.  
  332. If the AutoLook window doesn't show the one you want,
  333. press <Enter>; a lookup window appears holding full
  334. prototypes for all methods with that name; use the lookup
  335. window's popup menu to pick the one you want; then jump
  336. to it as described above for full method names.
  337.  
  338. More than one definition for a term: 
  339. press <Enter> to look the name up; use the popup menu in the
  340. lookup window to pick the definition you want (<Option> click
  341. in the window's title bar); and then use <Option>double-click on
  342. the name, or "Find Definition" without changing the default
  343. selection. The popup menu includes truncated full path names
  344. for the defining files, so you can tell which definition is which.
  345.  
  346. Static functions and variables: if you're in the file where it is
  347. defined, just <Option>double-click on the name. If you have
  348. several definitions of such a name and you aren't in the file where
  349. it is defined, use the approach for more than one definition described
  350. just above.
  351.  
  352. Local variables: hey, why not, just for the sake of completeness.
  353.  
  354. §    Multi-file search
  355. The Find dialog contains buttons to select all files of a particular
  356. type in the project window. Files selected for multi-file
  357. operations (including searching) have bullets (•) to their left in
  358. the project window. To "fine tune" your multi-file selection, hold
  359. down the <Option> key and click or drag right in the project
  360. window.
  361.  
  362. The "Batch" check box allows you to generate a list of all lines
  363. where the search string can be found in your multi-file selection
  364. (the "Find In Next File" button in the Find dialog changes to read
  365. "Batch Find"). To jump to the file and line indicated for one of the
  366. finds that's shown in the result window, click on the line and
  367. use "Go to...".
  368.  
  369. Multi-file selections have other uses, such as "Remove •'d files",
  370. input for several "Index" commands, and input for hAWK programs
  371. (see the «hAWK User’s Manual»).
  372.  
  373. Placing a dash '-' beside a project file name indicates that it
  374. should be excluded when building your dictionary, but it's often
  375. the case that you don't want to search those files either.
  376. In the Find dialog, the "Skip '-'" checkbox allows you to exclude
  377. files marked with a dash '-' in the project window when doing
  378. a multi-file operation such as searching.  Please note this
  379. checkbox affects all other buttons in the Find dialog, and all
  380. operations done with the file list. Specifically, the All and
  381. None buttons don't touch files marked with a dash '-' if the
  382. "Skip '-'" checkbox is checked, and such files aren't passed to
  383. a hAWK program, or looked at when you click "Find In Next File".
  384.  
  385. The "Dual Batch Find" button in the Find dialog calls up a separate
  386. (modal alas) dialog that lets you search for two search strings
  387. that occur within a certain number of lines or characters of each
  388. other. Clicking OK fires off a search of your bulleted files, with
  389. results of the search presented in a text window. "Zero" lines
  390. means on the same line, and a separation of zero characters means
  391. the two strings must occur together with no characters between
  392. (as in "Cmd" and "Handle" matching "CmdHandle" or "HandleCmd").
  393. Dual Batch Find obeys your "Match Words" and "Ignore Case"
  394. settings in the main Find dialog.
  395.  
  396. §    Accessing THINK Reference
  397. Beside EnterAct at the same level, have a folder entitled "Tools"
  398. or "(Tools)"; drop an alias of THINK Reference in this folder.
  399.  
  400. To look up THINK Ref's thoughts on a term, select it or click
  401. to the right of it and issue "Find in THINK Reference" (<cmd><->).
  402.  
  403. §    Accessing Toolbox Assistant
  404. As for THINK Ref, but drop an alias of "QuickView" in your
  405. Tools folder. The "Find in Toolbox Assistant" command is
  406. at the bottom of the Search menu (<cmd><4>).
  407.  
  408. §    Editing and Undo
  409. All basic editing commands are undoable, with a single level
  410. of undo. This includes Replace All.
  411.  
  412. You can drag and drop text in the usual way. You can also paste
  413. and delete PICTs to illustrate your documents -- search for
  414. "Illustrating your text" in the «EnterAct 4 Manual».
  415.  
  416. As you work, EnterAct logs all of your activities (including
  417. contents of edits) to the "EnterAct Recent Activities" file. In a
  418. pinch, you can recover the contents of a delete or remind yourself
  419. of what you just did by selecting "Show Activities..." from
  420. the Edit menu.
  421.  
  422. Well, not all of your activities, only the last ten thousand.
  423.  
  424. See «EnterAct 4 Manual» 4621 for a new and nicer way to cut
  425. and paste blocks of code. (To go there: add this file and the
  426. EnterAct 3 Manual to an EnterAct project, then click anywhere
  427. in the first line of this paragraph and use the "Go to" command,
  428. uner the Search menu).
  429.  
  430. §    Working with Code Warrior
  431. By default, when you open a document and Code Warrior also has
  432. the document open, EnterAct will force Code Warrior to close and
  433. save the file before opening it, asking you first of course before
  434. doing so. To turn this off, deselect the "Safe switching under
  435. MultiFinder" option in the Options... dialog (under the Edit menu).
  436. Having this option on also means that EnterAct will save all your
  437. documents when you switch out, and refresh them from disk
  438. when you switch back if they have been changed by some other
  439. application.
  440.  
  441. §    The Locations Menu
  442. Select "Add Current Location" to add a sort of "global marker" to
  443. the Locations menu for your current location. This is project
  444. independent, though note the position will not be maintained
  445. if you edit the corresponding source file with another editor.
  446. The text you have selected when you use the Add Current Locations
  447. command will be entered as the default name of the position in
  448. the dialog that subsequently appears: you can edit this name, or
  449. use no name at all and EnterAct will make up a name for you.
  450.  
  451. To remove a location from this menu:
  452.     • go to the location (typically by picking it from the Locations menu)
  453.     • select Delete Current Location from the Locations menu.
  454.  
  455. If the location does not exist any more, when you pick it from
  456. the Locations menu you will be told it can't be found, and asked if
  457. you want to delete it from the menu.
  458.  
  459. You can have up to 10 different locations under this menu.
  460.  
  461. §    Code Templates
  462. Great fun. All templates are stored in the text file "EnterAct
  463. Code Templates", which is very easy to modify (please take a look
  464. at it). Add this file to the folder where you keep EnterAct, at the
  465. same level.
  466.  
  467. To use a template, you type its name and press <command><return>.
  468. And <command><return> will also advance you to the next logical
  469. insertion point in your template (or in any code for that matter). If
  470. you save changes to your "EnterAct Code Templates" file using
  471. EnterAct, your new templates are instantly available (no need to
  472. quit and restart). Templates don't have to contain code, and
  473. template names can contain any non-blank characters, not just
  474. letters and numbers.
  475.  
  476. Each entry has the form
  477. ____
  478. ENTRY
  479. entry_name
  480. arbitrary text
  481.     making up the definition
  482. of the entry
  483. END
  484. ____
  485.  
  486. For the complete details on code templates, see the top of
  487. the "EnterAct Code Templates" file. If you'd like to try one
  488. now and you're using EnterAct, open a new window and type
  489. ____
  490. html<command><return>
  491. ____
  492.  
  493. Keep all your entries flush-left, and EnterAct will adjust your
  494. indentation when pasting your template in. Just open up a new line
  495. and tab in to the right position before typing the entry name and
  496. pressing <command><return>.
  497.  
  498. Tip: add "EnterAct Code Templates" to your "Locations" menu so you
  499. can change your templates on the fly.
  500.  
  501. -----------------
  502. Other useful things
  503. -----------------
  504. You can Balance a delimiter by double-clicking on it.
  505.  
  506. EnterAct comes equipped with hAWK, a version of AWK. It really
  507. is "three clicks and Run", with many supplied programs. See the
  508. «hAWK User’s Manual» for details. You can also fire off a hAWK
  509. program by using a command line, and you can save the command
  510. line as a "code template" in the "EnterAct Code Templates" file.
  511. If you'd like to try one now and have fully installed EnterAct,
  512. open up a new window and type the word "time", then hit
  513. <command><return> twice. The first <command><return> expands
  514. "time" into a hAWK command line, and the second <command><return>
  515. runs the corresponding hAWK program. Neat, eh?
  516.  
  517. EnterAct's <Enter>-driven lookup tolerates many kinds of spelling
  518. and (more importantly) memory errors. When in doubt, give it your
  519. best guess and press <Enter>. For extreme cases, use the "Options"
  520. dialog to increase the "Number of entries per lookup window" to 20.
  521. For emergency use only, use <Option><Enter> instead of plain <Enter>
  522. to fire up EnterAct's most error tolerant definition retriever - be
  523. prepared for some wild guesses mixed in there with the good ones!
  524.  
  525. To look up the last word on the clipboard, typically copied while in
  526. another application, press <Command><Enter>. Note if you have
  527. the AutoLook window open it will automatically show a definition
  528. for a word on the clipboard as you switch back to EnterAct.
  529.  
  530. "Go to..." is very general. It accepts line numbers, file names, marker
  531. names, and combinations such as file name/marker name, file
  532. name/line number. Handy for placing references in code files to
  533. supporting documentation. Moderately error tolerant, full correct
  534. spelling not required. To see it work, add the "EnterAct 3 Manual" to
  535. your project if you haven't done so, then click anywhere on the
  536. following line and "Go to":
  537. «EnterAct 4 Man» «17   “Go” cmds»
  538.  
  539. The European-style quotes «» are helpful in most "Go to" link names;
  540. to generate these painlessly, see
  541. «EnterAct 4 Man»  6489 (any individual mark)
  542. and
  543. «EnterAct 4 Man» 8202 (marks in documentation files especially).
  544.  
  545. "Go to" also accepts CodeWarrior-style error locations, such as
  546. ____
  547. Error   : declaration syntax error
  548. CEDAR_AutoLook.c line 2653   return FALSE;
  549. ____
  550. -just click on either line and pick "Go to".
  551.  
  552. To open an included file, click on the line in your source where it's
  553. included and use "Go to".
  554.  
  555. EnterAct projects accept PICT files.
  556.  
  557. Printing doesn't clip off long lines, it wraps them around.
  558.  
  559. EnterAct can be used as the THINK Project Managers's editor,
  560. as explained in either the THINK or EnterAct manuals.
  561.  
  562. When EnterAct can't locate a project file, and you have enabled
  563. the "Relocate files automatically" option,  it starts searching
  564. at the top of the disk where the file was last seen and
  565. searches down until it finds it (or not). Renaming or moving
  566. a folder does not affect EnterAct's memory of where a file is.
  567. Activating the "Relocate files automatically" option is NOT
  568. recommended, unless you're absolutely sure all your files
  569. have unique names.
  570.  
  571. If you have favorite AppleScripts to compile projects etc, drop
  572. them in the (EnterAct Scripts) folder for easy access.
  573. The scripts must be compiled scripts, not just text-only.
  574. They should do something simple and straightforward, and then
  575. quit, since you won't be able to continue working in EnterAct
  576. until the script finishes.
  577.  
  578. That's more than enough to get going. If you become inordinately
  579. fond of EnterAct's definition lookup capabilities, be sure to read
  580. through the full manual for details on the above features and a
  581. host of others.
  582.  
  583.